A Simple and Efficient Copying Garbage Collector for Prolog

نویسندگان

  • Johan Bevemyr
  • Thomas Lindgren
چکیده

We show how to implement eecient copying garbage collection for Prolog. We measure the eeciency of the collector compared to a standard mark-sweep algorithm on several programs. We then show how to acco-modate generational garbage collection and Prolog primitives that make the implementation more diicult. The resulting algorithms are simpler and more eecient than the standard mark-sweep method on a range of benchmarks. The total execution times of the benchmark programs are reduced by 4 to 11 percent.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Copying garbage collection for WAM-based prolog systems

High-level programming languages like Prolog free the programmer from the burden of explicit memory management. In Prolog, dynamic memory allocation is done implicitly by creating data structures. The deallocation of data structures which are no longer in use, is the responsibility of the run-time system. Many Prolog implementations are based on the Warren Abstract Machine (WAM), a virtual mach...

متن کامل

Incremental copying garbage collection for WAM-based Prolog systems

We present an incremental copying garbage collector for the heap in WAM-based Prolog systems. We describe a heap layout in which the heap is divided in a number of equal-sized blocks. Other changes to the standard WAM allow to garbage collect these blocks independently from each other. Independent collection of heap blocks is the basis of our incremental algorithm. Compared to other copying col...

متن کامل

Multi-phase Copying Garbage Collection in LOGFLOW*

In this paper a new type of copying garbage collectors is presented. The main goal of the modification of the original method was the reduction of the memory area reserved by the collector. The new Multi-phase Copying Garbage Collection (MC-GC) algorithm reserves only a little part of the memory. It works in more than one phases, using all available free memory areas in each phase. Performance ...

متن کامل

Heap Memory Management in Prolog with Tabling: Principles and Practice

We address memory management aspects of WAM-based logic programming systems that support tabled evaluation through the use of a suspension/resumption mechanism. We describe the memory organization and usefulness logic of such systems, and issues that have to be resolved for effective and efficient garbage collection. Special attention is given to early reset in the context of suspended computat...

متن کامل

Uppsala Theses in Computing Science 26 Compilation Techniques for Prolog Compilation Techniques for Prolog

Current Prolog compilers are largely limited to optimizing a single predicate at a time. We propose two methods to express the global control of Prolog programs. The rst method transforms a Prolog program into a continuation-passing style, where all operations have explicit success and failure continuations. The second method directly constructs a control ow graph from the Prolog program. This ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1994